-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Qi UTXO related types #204
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a couple of comments. Will continue reviewing
2b89faa
to
7e058a4
Compare
src/wallet/qi-hdwallet.ts
Outdated
throw new Error(`Account ${info.account} not found in wallet`); | ||
} | ||
// validate Outpoint | ||
if (info.outpoint.Txhash == null || info.outpoint.Index == null || info.outpoint.Denomination == null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to replace properties name here with lowercase (i.e. txhash
, index
, denomination
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
src/providers/provider-jsonrpc.ts
Outdated
|
||
import type { PerformActionRequest, Subscriber, Subscription } from './abstract-provider.js'; | ||
import type { Networkish } from './network.js'; | ||
import type { TransactionRequest } from './provider.js'; | ||
import type { Provider, QuaiTransactionRequest, TransactionRequest, TransactionResponse } from './provider.js'; | ||
import { UTXOEntry, UTXOTransactionOutput } from '../transaction/utxo.js'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UTXOEntry
and UTXOTransactionOutput
are unused imports
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
src/providers/provider-jsonrpc.ts
Outdated
(async () => { | ||
const address = await resolveAddress(hexlify(tx.outputs![i].address)); | ||
tx.outputs![i].address = getBytes(address); | ||
})(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Compile error:
error TS2322: Type 'Uint8Array' is not assignable to type 'string'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All test pass
Initial pass at updating UTXO related types. These changed are currently untested.